<?php

/**
 * @author christian
 * @copyright 2011
 *  
 */
 

 //establecer una variable conratafisica $_LOCALHOST
$ruta=$_SERVER['DOCUMENT_ROOT']."/viventura"."/MDTour";
include_once("$ruta/star.php");
//include_once("$rut/conf/CConfig.php");


/** Datos del paquete-tour  */
 
if (!isset($_GET['default'])) {$_GET['default'] = "NULL"; }
if (!isset($_POST['idExt'])) {$_POST['idExt'] = "NULL"; }
if (!isset($_POST['NomExt'])) {$_POST['NomExt'] = "NULL"; }
if (!isset($_POST['DesExt'])) {$_POST['DesExt'] = "NULL"; }
if (!isset($_POST['PriExt'])) {$_POST['PriExt'] = "NULL"; }
if (!isset($_POST['idOpe'])) {$_POST['idOpe'] = "NULL"; }


$default=$_GET['default'];
$idExt=$_POST['idExt'];
$NomExt=$_POST['NomExt'];
$DesExt=$_POST['DesExt'];
$PriExt=$_POST['PriExt'];
$OpeExt=$_POST['idOpe'];


if($default==1){ // registrar
   

                $querybasic = "insert into extensiones (idExt,NomExt,DesExt,PriExt,OpeExt) 
                 values ('NULL','$NomExt','$DesExt','$PriExt','$OpeExt')";
            
                $idExt = CModelo::getInstance()->insertData($querybasic);

                 echo "<script> parent.location.href = 'CExtensiones.php' </script>";
    }

else{ // actualizar
     
       
    }
    
      
        
        
 
//include_once("$rut/elements/head.tpl");
include_once("$rut/elements/foot.tpl");







?>